package com.wx.fresh.user.api;
import com.wx.fresh.common.pojo.CUser;
import com.wx.fresh.user.dto.PlatformUserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Dshzs月
 * @version 1.0.0
 * @ClassName CustomUserService.java
 * @Description TODO
 * @createTime 2022年04月27日 10:31:00
 */
@Primary
@FeignClient(value = "user-server-core-biz", path = "/user")
public interface UserFeignClient {
    //查询所以用户列表
    @RequestMapping(value = "platformFindAll", method = RequestMethod.GET, consumes = "application/json")
    List<CUser> FindAll(@RequestBody PlatformUserDto platformUserDto);


    //编辑单个用户
    @RequestMapping(value = "platformEdit", method = RequestMethod.POST, consumes = "application/json")
    int Edit(@RequestBody PlatformUserDto t);

    //根据查询单个用户
    @RequestMapping(value = "platformFindById", method = RequestMethod.GET, consumes = "application/json")
    PlatformUserDto FindById(@RequestParam("id") Long id);

    //删除单个用户
    @RequestMapping(value = "platformDelete", method = RequestMethod.DELETE, consumes = "application/json")
    int Delete(@RequestParam("id") Long id);

}
